home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Graphics / Utilities / 3-D viewer Folder / 3-D docs.txt next >
Text File  |  1994-03-09  |  4KB  |  81 lines

  1. Documentation for 3-D Object Viewer 0.1a
  2. ©1994 Brian T. Smith, some portions ©1991 Symantec
  3. Developed in THINK Pascal 4.0
  4.  
  5. This is a pretty simple three-dimensional object constructor and manipulator.  You construct objects by defining the primitive constructive shapes, and then connecting those shapes together.  
  6.  
  7. Constructing a primitive:
  8.  
  9. Start off with just one primitive.  You can make a square :
  10.  
  11. Primitives: 1
  12. Points in primitive 1: 4
  13. point1: -40 -40
  14. point2: 40 -40
  15. point3: 40 40
  16. point4: -40 40
  17.  
  18. angle of rotation: 0
  19.  
  20. This will make the square       1-----2
  21.                                                  |         |
  22.                                                 4-----3
  23.  
  24. Notice that the quadrants are reversed, in regular geometry point 1 would
  25. be -40 40.  The mac quadrants are:
  26.                                          y
  27.                                                             -x -y   |  x -y
  28.                          x   ------+------
  29.                               -x y     |  x y  
  30.  
  31. It is a good idea to center your primitives around 0,0.  This is considered the
  32. object's center.  Primitives defined otherwise will be offset and will rotate around 0,0 instead of what you consider the center.
  33.  
  34. Try resizing and rotating the square.  The commands are written in the 
  35. text box.  Just type the lowercase letter in parenthesis, followed by a parameter if these is a letter following the function name.  Sizes are real values, angles are in integer degrees.
  36.  
  37. For the full rotate function, the parameter is the number of degrees that will be rotated in each step of the rotation.  (ie, a 2 would rotate the object horizontally through 360 degrees in 180 frames.)
  38.  
  39. Making an object:
  40.  
  41. Type n for a new object.  Now, we're back at the beginning.
  42.  
  43. Primitives : 2
  44.  
  45. Rebuild the square from above.
  46. For primitive 2, enter points 4.
  47. Now reenter point 1 from the first square.
  48. Look what happens, a new question.  This is asking how to link the two primitives together.  You can enter as many points from the previous primitive that there are, or none.  NOTICE: you're entering the point number, not the actual x,y.   Enter 0 to end the entries.
  49.  
  50. To make a cube:
  51.  
  52. primitives: 2
  53.  
  54. enter the two squares like before, but this time link each point to its corresponding point in its predecessor (ie.  point1 in primitive2 gets linked to point 1 in primitive 3).
  55.  
  56. Enter 40 for the distance;  (this is length of the links between primitives 1 and 2).
  57.  
  58. Enter what you like for the rotation.
  59.  
  60. The reason for the manual linking is to allow more flexibility in linking between two different shaped primitives (ie a triangle and a square).
  61. I know it's a pain, but you can use it to acheive some neat effects.  Try linking each point in prim2 of the cube to all the points of prim1.
  62.  
  63. Sorry about the blinking rotation sequences, I don't know a whole lot about animation.  I included rotation sequences primarily to give users a better perspective of their objects.
  64.  
  65. You can make pretty complex objects .  Up to 8 primitives can be used with up to 10 points each.  Experiment! Have fun!
  66.  
  67. Why Pascal? Why black and white?  Why are the windows so small?  Why didn't you use the FPU?
  68. -- Because I have a crummy little Mac + with 2.5 megs running System 6.0.7!  So, send your contributions today so I can get a Power PC!  : ) I can't compile C++ programs because of the size of IOStream.  So, I used THINK Pascal's C++-like object conventions.  Oh yeah, that's what the image is.  It's an object consisting of a whole bunch of arrays and linked-lists.  My algorith rotates the points in the primitives, then draws them to the screen and connects the dots.  Like I said, its really simple.  Only 534 lines of code.
  69.  
  70. Send any help, questions, comments to
  71. briant@cs.utexas.edu
  72. or
  73. Brian Smith
  74. 2301 S. Lakeshore #21206
  75. Austin, TX 78741
  76.  
  77. Thanks for your interest!
  78.  
  79.  
  80.  
  81.